
public class DivModDemo {

    public static void main(String[] avgs)
    {
        int a=8,b=5;
        System.out.println(a+"/"+b+"="+a/b);
        System.out.println(a+"/"+(-b)+"="+a/(-b));
        System.out.println(-a+"/"+b+"="+-a/b);
        System.out.println(-a+"/"+(-b)+"="+-a/(-b));

        System.out.println(a+"%"+b+"="+a%b);
        System.out.println(a+"%"+(-b)+"="+a%(-b));
        System.out.println(-a+"%"+b+"="+-a%b);
        System.out.println(-a+"%"+(-b)+"="+-a%(-b));
        
        //System.out.println(++a+"+"+b+"="+++a%b);  //Invalid argument to operation ++/--
        System.out.println(++a+"+"+b+"="+(++a)+b);
        System.out.println(a++ +"+"+(-b)+"="+(a++)+(-b));
        System.out.println(-++a+"+"+b+"="+-++a+b);
        System.out.println(-a++ +"+"+(-b)+"="+-++a+-b);


    }

    
}
